#include "mainwindow1.h"
#include "ui_mainwindow1.h"
#include <mainwindow.h>
#include <QApplication>
#include <QTableWidget>
#include <QHeaderView>
#include <form11.h>
#include <fzuijin.h>

MainWindow1::MainWindow1(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow1)
{
    ui->setupUi(this);
    //this->setWindowOpacity(0.95); // 设置透明度为95%
    this->setStyleSheet("QMainWindow::window-icon { display: none; }");
    this->setWindowTitle("B音乐");
    this->statusBar()->hide();
   // setStyleSheet("background-image: url(D:/QT/xiangmu11/1.png);");

    QString itemName[] = {"推荐","喜欢","最近播放","本地和下载","歌单"};
    int row = 0;
    for(QString var : itemName){
        QListWidgetItem *newItem = new QListWidgetItem;
        newItem->setText("推荐");
        ui->listWidget->insertItem(row,var);
        row++;
    }
    ui->listWidget->setStyleSheet("QListWidget {"
                                  "    padding-left: 50px;" // 设置左边距为50px
                                  "    height : 45px ;"
                                  "}");
    ui->listWidget->setSpacing(9); // 设置项之间的间距

    pf1 = new Form7(ui->frame);
    pf2 = new Form11(ui->frame);
    pf3 = new Fzuijin(ui->frame);
    pf4 = new Fxiazai(ui->frame);
    pf5 = new Fgedan(ui->frame);
    pf5->hide();


}

MainWindow1::~MainWindow1()
{
    delete ui;
}


void MainWindow1::on_listWidget_currentRowChanged(int currentRow)
{
    if(currentRow == 0)
    {
        pf1->show();
        pf2->hide();
        pf3->hide();
        pf4->hide();
        pf5->hide();

    }
    else if(currentRow == 1)
    {
        pf1->hide();
        pf2->show();
        pf3->hide();
        pf4->hide();
        pf5->hide();
    }
    else if(currentRow == 2)
    {
        pf1->hide();
        pf2->hide();
        pf3->show();
        pf4->hide();
        pf5->hide();
    }
    else if(currentRow == 3)
    {
        pf1->hide();
        pf2->hide();
        pf3->hide();
        pf4->show();
        pf5->hide();
    }
    else if(currentRow == 4)
    {
        pf1->hide();
        pf2->hide();
        pf3->hide();
        pf4->hide();
        pf5->show();
    }
}








